// 引入路由
const Router = require('koa-router')
const router = new Router();
const list = require("./list")
const home = require("./home")
const login = require("./login")


// router.get('/home',async (ctx)=>{
//     ctx.body = "首页"
// });

// router.get('/list',async (ctx)=>{
//     ctx.body = "列表页"
// });

router.use("/list", list.routes(), list.allowedMethods());
router.use("/home",home.routes(), home.allowedMethods());
router.use("/login",login.routes(), login.allowedMethods());

router.redirect("/","/home")
// 导出router给app.js使用
module.exports = router
